package com.fuxi;

public class fuxi_demo02 {
    private  int age;

    public fuxi_demo02() {
    }

    public fuxi_demo02(int age) {
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {

        if (age<0||age>150){

            System.out.println("年龄不合法");

        }else {
            this.age = age;
        }

    }
}
